<template>
	<div class="financeCourse"> 
		<div class="financeCourse_List">
			<!-- 页面4个圆点 -->
			<div class="lineRadius l1"></div>
			<div class="lineRadius l2"></div>
			<div class="lineRadius r1"></div>
			<div class="lineRadius r2"></div>
			<!-- 当页面有数据时 -->
			<div v-if="baseData.length>0" class="finance_List">
				<div class="finance_time_list">
					<div class="finance_time_item" v-for="(item,index) in baseData" :key="index">
						<div class="time">{{item.financing_date}}</div>
						<div class="title " :class="index==0?'active':''">{{item.financing_round}}</div>
					</div>
				
				</div>
				<div class="finance_line" >
					<div class="finance_line_item"  v-for="(item,index) in baseData" :key="index">
						<img  v-if="index==0" src="../../../public/images/enterprise/financeon@2x.png" >
						<img v-else src="../../../public/images/enterprise/qybgoff@2x.png" >
					</div>
					
				</div>
				<div class="finance_content_list">
					<div class="finance_content_item" v-for="(item,index) in baseData" :key="index">
						<div class="money">募资金额：<span>{{item.financing_amt}}万元</span></div>
						<div class="tongzi">上市地：{{item.investor_sname}}</div>
					</div>
					
				</div>
			</div>
			<!-- 当页面没有数据时 -->
			<div v-else class="finance_List"><h2>暂无数据</h2></div>
		</div>
		
	</div>
</template>

<script>
	export default{
		data() {
			return{
				sbcompany:'', //当前公司名
				baseData:[] //页面数据
			}
		},
		mounted() {
			this.getBasedata()
		},
		methods:{
			// 获取基本数据
			async getBasedata(){
				this.sbcompany=this.$route.query.comname
				// this.sbcompany='广东欧莱高新材料股份有限公司'
				var dt = {
					"params": {
						"normGuid": "16304232-814f-4e7d-a97e-77735ee58967",
							"fieldList": [{
								"key":"company_name",
								"value":this.sbcompany
							}]
						}
				};
				const aaa = await this.$api.post('dcockpit/rest/cockpitApi/searchListNormResult', dt)
				let {custom:{result}}={...aaa}
				this.baseData=result.cockpitData
			},
		}
	}
</script>

<style lang="stylus" rel='stylesheet/stylus' scoped>
	@import "~@/assets/financeCourse.styl"
</style>
